package RentCar;

import java.sql.SQLOutput;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("****************欢迎光临腾飞汽车租赁公司*******************");
        System.out.println("1.轿车   2.客车   3.卡车");
        System.out.print("请选择你要租贷的汽车类型:");
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
        if(a==1){
            Car car=new Car();
            car.leaseOutFlow();
            System.out.print("请输入你要租贷的天数:");
            int b=scanner.nextInt();
            System.out.println("分配给你的汽车牌号是:"+car.getVehicleId());
            System.out.println("你需要支付的费用是:"+car.calRent(b)+"元");
        }
        else if(a==2){
            Bus bus=new Bus();
            bus.leaseOutFlow();
            System.out.print("请输入你要租贷的天数:");
            int b=scanner.nextInt();
            System.out.println("分配给你的汽车牌号是:"+bus.getVehicleId());
            System.out.println("你需要支付的费用是:"+bus.calRent(b)+"元");
        }
        else{
            Trunk trunk=new Trunk();
            trunk.leaseOutFlow();
            System.out.print("请输入你要租贷的天数:");
            int b=scanner.nextInt();
            System.out.println("分配给你的汽车牌号是:"+trunk.getVehicleId());
            System.out.println("你需要支付的费用是:"+trunk.calRent(b)+"元");
        }
    }
}
